<?php namespace App\Admin\Experience\Enter\Listeners;

use Input;
use DB;
use App\Core\Exceptions\InputError;
use App\Core\Service\Listeners\UpdateListener as Base;

class UpdateListener extends Base {

    public function onUpdateSaved(){
        $id = $this->service->updateModel->id;

        if(!$id ){
            throw new InputError('参数有误');
            return;
        }
        $enter = DB::table('settled_in')
            ->where('id','=',$id)
            ->where('is_delete','=','0')
            ->first();
        $weburl = substr($enter->web_url,0,4);
        if($weburl != null && $weburl != 'http'){
            throw new InputError('网页链接格式有误');
            return;
        }


    }


}